﻿<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link href="~/static/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css" />
    <link href="~/static/h-ui.admin/css/H-ui.login.css" rel="stylesheet" type="text/css" />
    <link href="~/static/h-ui.admin/css/style.css" rel="stylesheet" type="text/css" />
    <link href="~/lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" type="text/css" />
    <title>西安建筑科技大学出版社-后台管理员登录</title>
    <meta name="keywords" content="基于H-ui开发 西安建筑科技大学出版社">
    <meta name="description" content="H-ui.admin XAUAT-press.admin">
</head>
<body>
    <div class="header"></div>
    @RenderBody()
    <div class="footer">
        <p>Copyright © 2019 XAUAT-press.admin v3.0 All rights reserved &nbsp;&nbsp;<a href="https://hupangpang.xyz/" target="_blank">西安建筑科技大学出版社官网</a></p>
    </div>
    <script type="text/javascript" src="~/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="~/static/h-ui/js/H-ui.min.js"></script>
    <script type="text/javascript" src="~/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="~/lib/layer/2.4/layer.js"></script>
    <script type="text/javascript" src="~/static/h-ui/js/H-ui.min.js"></script>
    <script type="text/javascript" src="~/static/h-ui.admin/js/H-ui.admin.js"></script>
    <script type="text/javascript" src="~/lib/My97DatePicker/4.8/WdatePicker.js"></script>
    <script type="text/javascript" src="~/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="~/lib/laypage/1.2/laypage.js"></script>
    <script type="text/javascript" src="~/lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script>
    <script type="text/javascript" src="~/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
    <script type="text/javascript" src="~/lib/jquery.validation/1.14.0/validate-methods.js"></script>
    <script type="text/javascript" src="~/lib/jquery.validation/1.14.0/messages_zh.js"></script>
    <script type="text/javascript" src="~/lib/webuploader/0.1.5/webuploader.min.js"></script>
    <script type="text/javascript" src="~/lib/ueditor/1.4.3/ueditor.config.js"></script>
    <script type="text/javascript" src="~/lib/ueditor/1.4.3/ueditor.all.min.js"></script>
    <script type="text/javascript" src="~/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
    <script type="text/javascript">
        $('input:first').focus();

        $('input[name = name]').focus(function () {
            $(this).attr('placeholder', '请输入用户名')
        });

        $('input[name = name]').blur(function () {
            val = this.value;
            if (val.length == 0) {

                $(this).attr('placeholder', '用户名不能为空')
                layer.tips('用户名不能为空！', '#loginUser', {
                    tips: [1, '#FF3030'],
                    time: 2000
                });
                $(this).data({ 's': '0' })
            }
            else {
                $(this).data({ 's': '1' })
            }
        });

        $('input[name = password]').focus(function () {
            $(this).attr('placeholder', '请输入密码')
        });

        $('input[name = password]').blur(function () {
            val = this.value;
            if (val.length == 0) {

                $(this).attr('placeholder', '密码不能为空')
                $(this).data({ 's': '0' })
            }
            else {
                $(this).data({ 's': '1' })
            }
        });
        function mylogin_check() {
            $('.auth').blur();
            tot = 0;
            $('.auth').each(function () {
                if ($(this).data('s') == 1) {
                    tot += 1;
                }
            });
            var name = $("#loginUser").val();
            var pwd = $("#loginPwd").val();
            var result;
            if (tot == 2) {
                $.ajax({
                    type: "POST",
                    async: false,
                    url: "/Home/LoginResult" + "?name=" + name + "&pwd=" + pwd,
                    success: function (data) {
                        result = data;
                    },
                    error: function (response) {
                        layer.msg('网络错误！', { icon: 5, time: 3000 });
                    }
                });
            }
            else {
                layer.msg('请填写相关信息再登陆');
                return false;
            }
            if (result == "nameFalse") {
                layer.tips('用户名不存在！', '#loginUser', { tips: [2, '#FF3030'], time: 2000 });
                return false;

            }
            else if (result == "passwordFalse") {
                layer.tips('密码错误！', '#loginPwd', { tips: [2, '#FF3030'], time: 2000 });
                return false;
            }
            else if (result == "ok") {
                layer.msg('登录成功', { icon: 1, time: 2000 });
                return true;
            }
        }
    </script>
</body>
</html>
